#include "longinputdialog.h"
#include "ui_longinputdialog.h"

LongInputDialog::LongInputDialog(const QString & title,
                                 const QString & labelText,
                                 const QString & contentText,
                                 QWidget       * parent) :
    QDialog(parent),
    ui(new Ui::LongInputDialog)
{
    ui->setupUi(this);

    this->setWindowTitle(title);
    ui->m_label->setText(labelText);
    ui->m_longInput->setPlainText(contentText);

    connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
}


QString LongInputDialog::contentText() const
{
    return ui->m_longInput->toPlainText();
}


LongInputDialog::~LongInputDialog()
{
    delete ui;
}

void LongInputDialog::changeEvent(QEvent *e)
{
    QDialog::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}
